﻿<!DOCTYPE html>
<!--动火安全作业审批-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <script src="../../static/js/Mock/JobLicenseApp.js"></script>
    <script src="../../static/js/Resource/JobLicenseApp.js"></script>
    <style>
        body {
            padding-bottom: 10px;
        }

        table {
            width: 100%;
            border-top: 1px solid;
            border-left: 1px solid;
            text-align: center;
        }

        table td {
            border-right: 1px solid;
            border-bottom: 1px solid;
            padding:10px
        }
    </style>
</head>

<body>
    <div id="app" v-cloak class="popupW150">
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">动火作业安全许可证</label>
        </div>
        <el-row>
            <!--时间-->
            <el-col span="4" offset="14">
                {{SystemDateTime}}
            </el-col>
            <!--Q/G11-018-R01-->
            <el-col span="3">
                {{IgnitionSafeHomeworkList.HeadLongNumber}}
            </el-col>
            <!--No-->
            <el-col span="3">
                {{IgnitionSafeHomeworkList.HeadShortNumber+mark.m}}
            </el-col>
        </el-row>
        <!--下方表格-->
        <el-form :model="Form" status-icon style="margin-top:5px;width:100%">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td width="8%" rowspan="5" style="text-align:center; ">工作内容</td>
                    <!--属地部门-->
                    <td width="23%">
                        {{HotWorkSafetyLicense.TerritorialDepartment+mark.m}}
                    </td>
                    <td width="23%">
                        {{Form.TerritorialDepartment}}
                    </td>
                    <!--动火区域-->
                    <td width="23%">
                        {{HotWorkSafetyLicense.HotArea+mark.m}}
                    </td>
                    <td width="23%">
                        {{Form.HotArea}}
                    </td>
                </tr>
                <!--动火位置等-->
                <tr>
                    <!--动火位置-->
                    <td width="23%" height="40px">
                        {{HotWorkSafetyLicense.HotFirePosition+mark.m}}
                    </td>
                    <td width="23%">
                        {{Form.HotFirePosition}}
                    </td>
                    <!--等级-->
                    <td width="23%">
                        {{HotWorkSafetyLicense.Level+mark.m}}
                    </td>
                    <td width="23%">
                        {{Form.Level}}
                    </td>
                </tr>

                <!--动火内容描述-->
                <tr>
                    <td colspan="4" style="text-align:left;">
                        {{HotWorkSafetyLicense.HotContentFescription+mark.m}}
                        {{Form.HotContentFescription}}
                    </td>
                </tr>
                <!--是否附图纸-->
                <tr>
                    <td width="46%" colspan="2">
                        <el-form-item :label="HotWorkSafetyLicense.IsSafeWorkProgram+mark.m" prop="IsSafeWorkProgram"
                            class="inputTextarea">
                            <el-radio-group v-model="Form.IsSafeWorkProgram" style="margin-top:13px">
                                <el-radio v-for="item in IsSafeWorkProgram" :label="item.value" :value="item.key">
                                    {{item.value}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </td>
                    <td width="46%" colspan="2">
                        <el-form-item :label="HotWorkSafetyLicense.IsDrawing+mark.m" prop="IsDrawing"
                            class="inputTextarea">
                            <el-radio-group v-model="Form.IsDrawing" style="margin-top:13px">
                                <el-radio v-for="item in IsDrawing" :label="item.value" :value="item.key">{{item.value}}
                                </el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </td>
                </tr>
                <!--//承包商-->
                <tr>
                    <!--承包商-->
                    <td colspan="4" style="text-align:left;">
                        <el-checkbox v-model="checked">{{GeneralLiftingWorkSafety.contractor+mark.m}}</el-checkbox>
                    </td>
                </tr>
            </table>

            <table cellpadding="0" cellspacing="0" style="border-top:0;">
                <!--作业类型-->
                <tr>
                    <td width="8%">{{HotWorkSafetyLicense.JobType}}</td>
                    <td>
                        <el-checkbox-group v-model="Form.JobType" @change="handleChecked">
                            <el-checkbox v-for="city in JobType" :label="city.value" :key="city.key">{{city.value}}
                            </el-checkbox>
                        </el-checkbox-group>
                    </td>
                </tr>
                <!--危害因素-->
                <tr>
                    <td width="8%">{{HotWorkSafetyLicense.HazardIdentification}}</td>
                    <td>
                        <el-checkbox-group v-model="Form.Hazard" @change="handleChecked">
                            <el-checkbox v-for="city in Hazard" :label="city.value" :key="city.key">{{city.value}}
                            </el-checkbox>
                        </el-checkbox-group>
                    </td>
                </tr>
                <!--气体检测人-->
                <tr>
                    <td colspan="2">
                        <span style="float:left;width:50%;text-align:center;">
                            {{HotWorkSafetyLicense.GasDetector+mark.m}}

                            {{Form.GasDetector}}
                        </span>
                        <span style="float:left;width:50%;text-align:center;">
                            {{HotWorkSafetyLicense.TestingRequirements+mark.m}}

                            {{Form.TestingRequirements}}
                        </span>
                    </td>
                </tr>
            </table>


            <table style="border-top:0px;" cellpadding="0" cellspacing="0">
                <!--气体检测标题-->
                <tr>
                    <td colspan="7" style="text-align:left;">
                        {{IgnitionSafeHomeworkList.GasDetection}}</td>
                </tr>
                <!--气体检测下部表格-->
                <tr>
                    <td>{{IgnitionSafeHomeworkList.DetectionTime}}</td>
                    <td>{{IgnitionSafeHomeworkList.DetectionPosition}}</td>
                    <td>{{IgnitionSafeHomeworkList.OxygenConcentration}}</td>
                    <td>{{IgnitionSafeHomeworkList.CombustibleGas}}</td>
                    <td>{{IgnitionSafeHomeworkList.ToxicGases}}</td>
                    <td>{{IgnitionSafeHomeworkList.TestConclusion}}</td>
                    <td>{{IgnitionSafeHomeworkList.TesterSignature}}</td>
                </tr>
                <tr v-for="(v,i) in Form.BaseDataBaseControlAsk">
                    <td>{{v.DetectionTime}}</td>
                    <td>{{v.DetectionPosition}}</td>
                    <td>{{v.OxygenConcentration}}</td>
                    <td>{{v.CombustibleGas}}</td>
                    <td>{{v.ToxicGases}}</td>
                    <td>{{v.TestConclusion}}</td>
                    <td>
                        <!--{{v.TesterSignature}}-->
                        <signature v-model="value" :disabled="false"></signature>
                    </td>
                </tr>
            </table>
            <!--涉及的其他特殊作业-->
            <table cellpadding="0" cellspacing="0" style="border-top:0;">
                <tr>
                    <td width="20%"> {{HotWorkSafetyLicense.OtherSpecialOperationsInvolved+mark.m}}</td>
                    <td width="30%"> {{Form.OtherSpecialOperationsInvolved}}</td>
                    <td width="20%"> {{HotWorkSafetyLicense.SafetyEducator+mark.m}}</td>
                    <td width="30%"> {{Form.SafetyEducator}}</td>
                </tr>
            </table>
            <!--安全措施-->
            <table cellpadding="0" cellspacing="0" style="border-top:0;">
                <tr>
                    <td width="8%"> {{'序号'}}</td>
                    <td width="50%"> {{HotWorkSafetyLicense.SafetyMeasures}}</td>
                    <td width="21%"> {{JobGeneralLiftingWorkDetailed.ImplementationSituation}}</td>
                    <td width="21%"> {{JobGeneralLiftingWorkDetailed.ConfirmerSign}}</td>
                </tr>
                <tr v-for="(v,i) in Form.HazardIdentification">
                    <td>{{i+1}}</td>
                    <td style="text-align:left;">{{v.SafetyMeasures}}</td>
                    <td>{{v.ImplementationSituation}}未落实</td>
                    <td>
                        <signature v-model="value" :disabled="false"></signature>
                    </td>
                </tr>
                <!--基于数据库管控要求下方表格-->
                <!--<tr>
                                <td colspan="4" style="text-align:left;">{{HotWorkSafetyLicense.BasedDatabaseManagementRequirements}}</td>
                            </tr>

                            <tr>
                    <td width="8%"> {{'序号'}}</td>
                    <td width="50%"> {{JobGeneralLiftingWorkDetailed.ControlAsk}}</td>
                    <td width="21%">    {{JobGeneralLiftingWorkDetailed.ImplementationSituation}}</td>
                    <td width="21%">   {{JobGeneralLiftingWorkDetailed.ConfirmerSign}}</td>
                </tr>
                <tr v-for="(v,i) in Form.EasyHoistingHomeworkDate">
                    <td>{{i+1}}</td>
                    <td>{{v.ControlAsk}}</td>
                    <td>{{v.ImplementationSituation}}</td>
                    <td>   <signature v-model="value" :disabled="false"></signature></td>
                </tr>-->
                <tr>
                    <td colspan="4" style="text-align:left;">
                        {{IgnitionSafeHomeworkList.StatementFirst}}<br />
                        {{IgnitionSafeHomeworkList.BeAffectedClass+mark.m}}
                        <!--受影响相关方--><br />
                        <span style="float:left;text-align:center;width:50%;">XXX</span>
                        <span style="float:left;text-align:center;width:50%;">2018-09-09</span>
                        <span style="float:left;text-align:center;width:50%;">YYY</span>
                        <span style="float:left;text-align:center;width:50%;">2018-09-09</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="text-align:left;">
                        {{IgnitionSafeHomeworkList.StatementSecond}}<br />
                        {{IgnitionSafeHomeworkList.UserFire+mark.m}} <signature v-model="value" :disabled="false">
                        </signature><br />
                        <!--动火人-->
                        {{IgnitionSafeHomeworkList.SuperviseFire+mark.m}} <signature v-model="value" :disabled="false">
                        </signature>
                        <!--监火人-->

                    </td>
                </tr>

            </table>

            <table cellpadding="0" cellspacing="0" style="border-top:0;">

                <tr>
                    <td rowspan="2" width="30%"> {{IgnitionSafeHomeworkList.StatementThird}}</td>
                    <td width="70%">
                        <span style="float:left;text-align:center;width:33%;">
                            {{IgnitionSafeHomeworkList.UserFire}}</span>
                        <span style="float:left;text-align:center;width:33%;">
                            {{IgnitionSafeHomeworkList.SpecialHomeworkId}}</span>
                        <span style="float:left;text-align:center;width:33%;">
                            {{IgnitionSafeHomeworkList.UserFireDatetime}}</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="float:left;text-align:center;width:33%;">
                            {{IgnitionSafeHomeworkList.SuperviseFire}} {{Form.SuperviseFire}} </span>
                        <span style="float:left;text-align:center;width:33%;">{{'工种'}} {{Form.WorkType}} </span>
                        <span style="float:left;text-align:center;width:33%;">
                            {{IgnitionSafeHomeworkList.UserFireDatetime}} {{Form.SuperviseFireDatetime}}</span>
                    </td>
                </tr>
            </table>

            <table cellpadding="0" cellspacing="0" style="border-top:0;">
                <tr>
                    <td width="50%"> {{IgnitionSafeHomeworkList.ProductionClassOpinion}}</td>
                    <td width="50%"> {{IgnitionSafeHomeworkList.HSEClassOpinion}}</td>
                </tr>
                <tr>
                    <td style="text-align:left;">
                        {{IgnitionSafeHomeworkList.StatementFourth}}<br />
                        {{IgnitionSafeHomeworkList.HomeworkLeadSign+mark.m}}<signature v-model="value"
                            :disabled="false"></signature>
                    </td>
                    <td style="text-align:left;">
                        {{IgnitionSafeHomeworkList.StatementFiveth}}<br />
                        {{IgnitionSafeHomeworkList.ApprovalLeadSign+mark.m}}<signature v-model="value"
                            :disabled="false"></signature>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align:left;">
                        {{IgnitionSafeHomeworkList.StatementSixthTitle}}<br />
                        {{IgnitionSafeHomeworkList.StatementSixth}}<br />
                        {{IgnitionSafeHomeworkList.StatementSeventh+mark.m}}<signature v-model="value"
                            :disabled="false"></signature>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align:left;">
                        {{IgnitionSafeHomeworkList.StatementEighth}}<br />
                        {{IgnitionSafeHomeworkList.JobManagere+mark.m}}
                        <signature v-model="value" :disabled="false"></signature>
                    </td>
                </tr>
            </table>


            <!--底部按钮-->
            <el-row type="flex" justify="end">
                <el-form-item>
                    <!--提交-->
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSubmit}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <!--弹出层-->
        <!--
            <el-dialog title="" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
        -->
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                Form: {
                    id: guidEmpty,
                    ApplicationNumber: '', // "申请编号",
                    ApplicationTime: '', // "申请时间",
                    applicant: '', //"申请人",
                    OperatingUnit: '', //"作业单位",
                    JobManagere: '', //"负责人",
                    JobLocation: '', // "作业地点",
                    JobStartTime: '', //"作业起始时间",
                    JobEndTime: '', // "有效截至时间",
                    TerritorialDepartment: '', // "属地部门",
                    CurrentJob: '', // "当前作业",
                    WorkContent: '', // "工作内容",
                    HotArea: '', // "动火区域",
                    HotFirePosition: '', // "动火位置",
                    HotContentFescription: '', // "动火内容描述",
                    IsSafeWorkProgram: '', // "是否附安全工作方案",
                    Level: '', //"等级",
                    IsDrawing: '', // "是否附图纸",
                    GasDetector: '', // "气体检测人",
                    TestingRequirements: '', // "检测要求(检测频次)",
                    JobType: '', //"作业类型",
                    Hazard: '',//"危害辨识",
                    contractor: '',// "承包商",
                    OtherSpecialOperationsInvolved: '',
                    SafetyEducator: '',
                    HazardIdentification: '',//安全措施
                    BasedDatabaseManagementRequirements: '',// "基于数据库管控要求",
                    AffectedParties: '',// "受影响相关方",
                    HotFire: '',// "动火人",
                    Fireman: '',// "监火人",
                    Production: '',// "生产部",
                    HSEDepartment: '',// "HSE部",
                    Approver: '',//,  "审批人",
                    In_ClassSquadLeader: '',//, "当班班长",
                    //下方表格中数据赋值
                    UserFire: '',
                    SpecialHomeworkId: '',
                    UserFireDatetime: '',
                    SuperviseFire: '',
                    WorkType: '',
                    SuperviseFireDatetime: '',
                    EasyHoistingHomeworkDate: [],
                },
                TerritorialDepartment: [],
                Level: [],
                contractor: [],
                Confirmor: [],
                OperatingUnit: [],
                HotArea: [],
                TestingRequirements: [],
                IsSafeWorkProgram: [],
                IsDrawing: [],
                JobType: [],
                Hazard: [],
                rules: {},
                BasedDatabaseManagementRequirements: [],
                ListItem: ListItem,
                SystemDateTime: '',
                checked: true,
                value: '',

            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                handleSelect: function (ev) {
                    console.log(ev);
                },
                handleChecked: function (value) {
                },
                handleCheckedConfirmation: function (value) {
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                //得到上方表格数据
                getData: function () {
                    getDataAdd(this, '/api/HotWorkSafetyLicense/get?id=' + this.id);
                },

                In_ClassSquadLeaderInput: function (val, id) { DialogShow(this, val, "In_ClassSquadLeaderInput.html", id); },
                HSEDepartmentInput: function (val, id) { DialogShow(this, val, "HSEDepartmentInput.html", id); },
                ProductionInput: function (val, id) { DialogShow(this, val, "ProductionInput.html", id); },
                FiremanInput: function (val, id) { DialogShow(this, val, "FiremanInput.html", id); },
                AffectedPartiesInput: function (val, id) { DialogShow(this, val, "AffectedPartiesInput.html", id); },
                HotFireInput: function (val, id) { DialogShow(this, val, "HotFireInput.html", id); },

                ApproverInput: function (val, id) { DialogShow(this, val, "../GeneralLiftingWorkSafety/ApproverInput.html", id); },
                LiftingOperatorInput: function (val, id) { DialogShow(this, val, "../GeneralLiftingWorkSafety/LiftingOperatorInput.html", id); },
                RiskInformationBase: function (val, id) {
                    DialogShow(this, val, "../GeneralLiftingWorkSafety/RiskInformationBase.html", id);
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    onSubmitForm(this, '/api/HotWorkSafetyLicense/Save', mythis.Form);
                },
            },
            mounted: function () {
                var date = new Date();
                var list = getDicDataArray(['14', '03', '50', '12', '09', '08', '97', '120', '121', '122']);
                this.OperatingUnit = getDicDatafromArray('08', list);
                this.TerritorialDepartment = getDicDatafromArray('14', list);//工作类型
                this.Level = getDicDatafromArray('03', list);//工作类型
                this.contractor = getDicDatafromArray('12', list);//工作类型
                this.Confirmor = getDicDatafromArray("09", list);//批准人
                this.HotArea = getDicDatafromArray("97", list);//批准人
                this.IsSafeWorkProgram = getDicDatafromArray('50', list);
                this.IsDrawing = getDicDatafromArray('50', list);
                this.TestingRequirements = getDicDatafromArray('120', list);
                this.JobType = getDicDatafromArray('121', list);
                this.Hazard = getDicDatafromArray('122', list);
                /////////***********************////////
                var list = getDicDataArray(['14', '03', '50', '12', '09', '08']);
                this.OperatingUnit = getDicDatafromArray('08', list);//
                this.TerritorialDepartment = getDicDatafromArray('14', list);//
                this.Level = getDicDatafromArray('03', list);//等级
                this.IsDevelopSafetyPlan = getDicDatafromArray('50', list);//
                this.contractor = getDicDatafromArray('12', list);//
                this.Confirmor = getDicDatafromArray("09", list);//批准人
                /////////***********************////////
                this.id = getUrlParam("id");
                this.getData();
                if (this.id == null) {
                    this.SystemDateTime = date.getFullYear() + "年" + date.getMonth() + "月" + date.getDay() + "日" + date.getHours() + "时" + date.getMinutes() + "分";
                    this.Form.OtherSpecialOperationsInvolved = "涉及的其他特殊作业xxxxxxxxxx";
                    this.Form.SafetyEducator = "安全教育人xxxxxxxx";
                    this.Form.TerritorialDepartment = "属地部门xxxxxxxxxx";
                    this.Form.HotArea = "动火区域xxxxxxxxxxxx";
                    this.Form.HotFirePosition = "动火位置xxxxxxxxxxxxxxx";
                    this.Form.Level = "等级xxxxxxxxxxxxxxx";
                    this.Form.GasDetector = "气体检测人xxxxxxxxxxxxxx";
                    this.Form.TestingRequirements = "检测要求(检测频次)xxxxxxxxxxxxxxx";
                    this.Form.HotContentFescription = "动火内容描述xxxxxxxxxxxxxxxxxxxxx";
                    this.Form.contractor = "承包商xxxxxxxxxxxxxxxxxxx";
                    this.Form.UserFire = "动火人xxxxx";
                    this.Form.SpecialHomeworkId = "特种作业工种及证件号值xxxxx";
                    this.Form.UserFireDatetime = "时间xxxxx";
                    this.Form.SuperviseFire = "XXX";
                    this.Form.WorkType = "YYY";
                    this.Form.SuperviseFireDatetime = "2019-09-09";
                }
                this.Form.EasyHoistingHomeworkDate = [{
                    ControlAsk: '1.1、完善皮管捆扎合格标准；',
                    ImplementationSituation: '未落实'
                }, {
                    ControlAsk: '2.1、人员入职前进行三级教育2.2、入职后，每月车间主任组织一次安全考核、培训和安全例会，进行安全经验分享和知识分享；',
                    ImplementationSituation: '未落实'
                }]



                var BaseDataBaseControlAskData = [];
                for (var i = 0; i < 10; i++) {
                    BaseDataBaseControlAskData.push(Mock.mock({
                        DetectionTime: Mock.Random.date(),
                        DetectionPosition: '某位置',
                        OxygenConcentration: i * 10 + '%',
                        CombustibleGas: i * 10 + '%',
                        ToxicGases: i * 10,
                        TestConclusion: '结论',
                        TesterSignature: Mock.Random.cname()
                    }))
                }
                this.Form.BaseDataBaseControlAsk = BaseDataBaseControlAskData






                //this.BasedDatabaseManagementRequirements = this.Form.BasedDatabaseManagementRequirements;
            }
        });
    </script>
</body>

</html>